package com.aop.service.impl;


import com.aop.mapper.DeptLogMapper;
import com.aop.pojo.DeptLog;
import com.aop.service.DeptLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.PostConstruct;

/**
 * @author wzm
 * @create 2023-10-14 14:37
 * project_name:stu_sys
 */
//添加日志的service实现类
@Service
public class DeptLogServiceImpl implements DeptLogService {
    @Autowired
    private DeptLogMapper deptLogMapper;

    @Transactional(propagation = Propagation.REQUIRES_NEW) //事务的传播行为 无论是否有新的事务都新建事务执行当前方法
    @Override
    public void insert(DeptLog deptLog) {
        deptLogMapper.insert(deptLog);

    }

}
